#include <stdio.h>

#include "Run_queue.h"
#include "new.h"
int main(int argc, char ** argv)
{
	void *pQueue = Queue_Create(10, sizeof(int), 5);
	int nCount = Queue_GetCount(pQueue);
	printf("before put, nCount:%d, Memory:%d\n", nCount, MEMORY_USED);
	int i=0;
	for(i=0;i<31;i++)
	{
		Queue_Put(pQueue, (void*)&i, FALSE);
	}
	nCount = Queue_GetCount(pQueue);
	printf("after put, nCount:%d\n", nCount);
	
	int value = -1;

	for(i=0;i<31;i++)
	{
		Queue_Get(pQueue, &value, FALSE, 500);
		printf("value:%d\n", value);
	}

	nCount = Queue_GetCount(pQueue);
	printf("after get , nCount:%d\n", nCount);
	getchar();
	Queue_Destory(pQueue);
	printf("after destory memory used:%d\n", MEMORY_USED);
	return 0;
}

